<template>
  <div>
    <el-button @click="exportExcel">导出 Excel</el-button>
  </div>
</template>

<script>
// import {onExportExcel} from './excelExport.js'
export default {
  name: 'uploadExcelPage',
  data() {
    return {
      headerMapping: {
      pkId: '主键',
      sysEngName:'系统英文名',
      channelSysName:'服务名称',
      mdsSvcCode:'服务编码',
      maxConcurrency:'最大并发数',
      principal:'负责人',
      肤色RuleJSON: '熔断规则',
      delFlag: '是否删除',
      errMessage: '错误信息',
      }
    }
  },
  methods: {
    // 
    handleExportExcel() {
      this.onExportExcel()
    },
    exportExcel() {
      // 模拟数据，实际应用中可以从后端获取或根据业务逻辑生成
      const data = [
        {
          delFlag:"0",
          errMessage:'服务名称格式有误',
          maxConcurrency: -1,
          mdsSvcCode: "1",
          mdsSvcName:'自测熔断最大值',
          pkId:'121231213',
          sysEngName:'test',
        }
      ];
      this.handleExportExcel(data, this.headerMapping,'导出数据')

    }
  },
}
</script>

<style>

</style>